package com.ynny.demo09;


    public class MyStringTest {
        public static void main(String[] args) {
            String s1 = "hello java";
            String s2 = "hello java";
            if (s1.equals(s2)) {
                String a = s1.replace(" ", "");

                String b = a.replace("java", "word");

                System.out.println("修改后的字符串: " + b);
            } else {
                System.out.println("两个字符串不相等");
            }
        }
    }

